<template>
  <a-config-provider 
  	:token="token" 
  	:userDetail="userDetail"
  >
    <HelloWorld msg="登录成功"/>
    token:{{token}} <br>
    userDetail:{{userDetail}}
  </a-config-provider>
</template>

<script lang="ts">
import { computed, defineComponent } from 'vue';
import { useStore } from 'vuex'
import HelloWorld from '@/components/HelloWorld.vue'; 
import { StateType } from '@/@types'

export default defineComponent({
  name: 'Home',
  setup() {
  	const app = computed(() => store.state.app);
    const store = useStore<StateType>();
    const token = computed(() => store.state.user.token);
    const userDetail = computed(() => store.state.user.userDetail);

    return {
      token,
      userDetail
    }
  },
  components: {
    HelloWorld,
  },
});
</script>
